<style>
	.p-all-40{
		margin: 20px ;
	}
</style>
<template>
    <el-row class="p-all-40">
        <div class="block" align="center">
					<el-pagination 
						background 
						:pageSize="pageSize" 
						@current-change="handleCurrentChange" 
						layout="prev, pager, next" :total="pageTotal">
					</el-pagination>
        </div>
    </el-row>
</template>
<script>
export default {
	props: {
		// 页面
		currentPage: {
			required: true,
			default: 10
		},
		// 多少条
		pageSize: {
			required: true,
			default: 0,
			type: Number
		},
		// 总条数
		pageTotal: {
			required: true,
			default: 0,
			type: Number
		}
	},
	data() {
		return {
			page:0
		}
	},
	methods: {
		// 页码改变
		handleCurrentChange(val) {
			val = val - 1
			this.$emit('handleCurrentChange',val)
		}
	},
	created() {
		this.page = this.currentPage
	}
}
</script>
